// ===============================================
// icon_text
//
// Create by Will on 2020/10/5 6:05 PM
// Copyright @Will.All rights reserved.
// ===============================================

import 'package:flutter/material.dart';

import '../../toast.dart';

/// 图标+文字的Widget
class IconTextWidget extends StatelessWidget {
  const IconTextWidget({super.key, this.icon, this.text});

  final Widget? icon;
  final String? text;

  @override
  Widget build(BuildContext context) {
    return CoreKitToastContainer(
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: <Widget>[
          if (icon != null)
            Padding(
              padding: const EdgeInsets.only(bottom: 8),
              child: icon,
            ),
          if (text != null) Text(text!),
        ],
      ),
    );
  }
}
